package com.dora.basic.basic;

import lombok.AllArgsConstructor;
import lombok.Data;

/**
 * 人 类
 *
 * @author hanchen
 * @date 2024/02/20
 */
@Data
@AllArgsConstructor
public class Person implements Comparable<Person> {

    private String name;
    private int age;

    @Override
    public int compareTo(Person other) {
        return this.age - other.age;
    }

}
